package com.xhwl.centiotdata.mq.comsumer;

import com.alibaba.fastjson.JSON;
import lombok.extern.slf4j.Slf4j;
import org.apache.kafka.clients.consumer.ConsumerRecord;
import org.springframework.kafka.annotation.KafkaListener;
import org.springframework.stereotype.Component;

/**
 * @Author： lianghz
 * @Description：
 * @Date 2022/01/12/ 11:57
 */
@Slf4j
//@Component
public class TestConsumer {

//    @KafkaListener(topics = {""}, groupId = "test")
    public void receiveInput(ConsumerRecord<?, ?> record) {
        log.info("consumer" + JSON.toJSONString(record.value()));
    }

}
